<template>
    <div class="panel"></div>
</template>
<script>
import '../../static/up6/panel/up6.css'
import {HttpUploaderMgr} from '../../static/up6/panel/up6'
import $ from 'jquery'
export default {
  name: 'up6',
  props: {
    config: Object,
    fields: Object
  },
  data () {
    return {
      com: null
    }
  },
  mounted () {
    var _this = this
    this.com = new HttpUploaderMgr({
      Config: _this.config,
      Fields: _this.fields, // 赋加字段（业务参数）
      event: {// 绑定事件
        md5Complete: function (obj, md5) {
          _this.$emit('md5_complete', obj, md5)
        },
        scan_complete: function (obj) {
          _this.$emit('scan_complete', obj)
        },
        file_complete: function (obj) {
          _this.$emit('file_complete', obj)
        },
        folder_complete: function (obj) {
          _this.$emit('folder_complete', obj)
        },
        queue_complete: function () {
          _this.$emit('queue_complete')
        }
      },
      ui: {
        container: $('.panel')// 加载到目标
      }
    })
  },
  methods: {
  }
}
</script>
